package com.jetpack.mvvm.lib.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import com.alibaba.android.arouter.launcher.ARouter
import com.gyf.immersionbar.BarHide
import com.gyf.immersionbar.ImmersionBar

open class BaseActivity: AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setFullScreen()
        ARouter.getInstance().inject(this)
    }

    private fun setFullScreen() {
        ImmersionBar.with(this)
            .statusBarDarkFont(false)
            .transparentBar()
//            .statusBarColor(R.color.main_status_bar_blue)
            .hideBar(BarHide.FLAG_HIDE_NAVIGATION_BAR)
            .init()
//        WindowCompat.setDecorFitsSystemWindows(window, false)
//        val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView)
//        windowInsetsController.isAppearanceLightNavigationBars = false
//        windowInsetsController.isAppearanceLightStatusBars = true
    }
}